From 732a4d78122449e81e96f3b705c9966eccdee07f Mon Sep 17 00:00:00 2001 From: Gerd Moellmann Date: Mon, 27 Nov 2000 12:12:14 +0000 Subject: [PATCH] (try_window_id): Avoid starting to display in the moddle of a character, a TAB for instance. This is easier than to set up the iterator exactly, and it's not a frequent case, so the additional effort wouldn't really pay off. --- src/xdisp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/xdisp.c b/src/xdisp.c index 6cec7760926..16ac7dba318 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -10767,6 +10767,17 @@ try_window_id (w) last_unchanged_at_beg_row = find_last_unchanged_at_beg_row (w); if (last_unchanged_at_beg_row) { + /* Avoid starting to display in the moddle of a character, a TAB + for instance. This is easier than to set up the iterator + exactly, and it's not a frequent case, so the additional + effort wouldn't really pay off. */ + while (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row) + && last_unchanged_at_beg_row > w->current_matrix->rows) + --last_unchanged_at_beg_row; + + if (MATRIX_ROW_ENDS_IN_MIDDLE_OF_CHAR_P (last_unchanged_at_beg_row)) + return 0; + init_to_row_end (&it, w, last_unchanged_at_beg_row); start_pos = it.current.pos; -- 2.30.2